<template>
	<view class="params">
		<view  v-if="obj.list && obj.list.length > 0" class="list">
			<view class="row" v-for='(row,i) in  obj.list' :key='i'>
				<view class="title_type">
					<view class="left">
						<image :src="row.icon" mode="scaleToFill"></image>
						<text class="text">{{row.title}}</text>
					</view>
					<view class="right">
						<!-- <text class="text2">选择</text> -->
						<n-icon name="right" size="32" color="#fff"></n-icon>
					</view>
				</view>
				<view v-if='row.list && row.list.length > 0'>
					<block v-if='row.id != 11'>
						<view class="content_list" v-for='(shop,shopI) in row.list' :key='shopI'>
							<view class="content_list_shop" v-if='row.id != 11'>
								<image :src="shop.user.avatar" mode="scaleToFill"></image>
								<text>{{shop.user.name}}</text>
							</view>
							<view  v-for='(commodity,commodityI) in shop.list' :key='commodityI'>
								<view class="content_list_commodity">
										<view class="right_left">
											<image :src="commodity.image" mode="scaleToFill"></image>
										</view>
										<view class="right_right">
											<view class="right_right_name">
												<view class="right_right_top_left">
													{{commodity.name}}
												</view>
												<view class="right_right_top_right">
													<view class="money">
														¥ {{commodity.amount_one}}
													</view>
													<view class="num">
														x{{commodity.count}}
													</view>
												</view>
											</view>
											<view class="right_right_label">
												选择：<text>{{commodity.goods_sku}}</text>
											</view>
											<view class="right_right_money_box">
												¥ {{commodity.amount}}
											</view>
										</view>
									</view>
								
							</view>
						</view>
					</block>
					<view class="content_list" v-else>
						<view class="" v-for='(commodity,commodityI) in row.list' :key='commodityI'>
							<view class="content_list_commodity" :class="commodityI== 0 ? 'content_list_commodity2' : ''">
									<view class="right_left">
										<image :src="commodity.image" mode="scaleToFill"></image>
									</view>
									<view class="right_right">
										<view class="right_right_name">
											<view class="right_right_top_left">
												{{commodity.name}}
											</view>
											<view class="right_right_top_right">
												<view class="money">
													¥ {{commodity.amount_one}}
												</view>
												<view class="num">
													x{{commodity.count}}
												</view>
											</view>
										</view>
										<view class="right_right_label">
											选择：<text>{{commodity.goods_sku}}</text>
										</view>
										<view class="right_right_money_box">
											¥ {{commodity.amount}}
										</view>
									</view>
								</view>
							
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			obj: {
				type: Object,
				defauly: () => {}
			},
		},
		data() {
			return {
			}
		},
		created(){
		},
	}
</script>

<style lang="less" scoped>
	.params {
		width: 550rpx;
	}
	.list{
		padding: 40rpx 36rpx;
		width: 100%;
		box-sizing: border-box;
		.row{
			width: 100%;
			border-radius: 16rpx;
			box-shadow: 0px 4rpx 20rpx 0rpx rgba(0,0,0,0.05); 
			overflow: hidden;
			margin-bottom: 40rpx;
			.title_type{
				padding: 30rpx 22rpx;
				width: 100%;
				box-sizing: border-box;
				display: flex;
				justify-content: space-between;
				align-items: center;
				color:#fff;
				background: #666666;
				.left{
					width: calc(100% - 160rpx);
					display: flex;
					justify-content: space-between;
					.text{
						width: calc(100% - 60rpx);
						font-size: 32rpx;
						line-height: 44rpx;
					}
					image{
						height: 44rpx;
						width: 44rpx;
						margin-right: 20rpx;
					}
					
				}
				.right{
					text-align: right;
					.text1{
						display: inline-block;
						width: 96rpx;
						height: 56rpx;
						font-size: 28rpx;
						color:#666;
						line-height: 56rpx;
						text-align: center;
						background: #ffffff;
						border-radius: 12rpx;
					}
					.text2{
						color:#DDDDDD;
						font-size: 28rpx;
						line-height: 40rpx;
						margin-right: 13rpx;
					}
				}
			}
			.content_list{
				padding: 0 20rpx;
				width: 100%;
				box-sizing: border-box;
				background-color: #fff;
				.content_list_shop{
					padding: 40rpx 0;
					box-sizing: border-box;
					width: 100%;
					display: flex;
					justify-content: space-between;
					align-items: center;
					image{
						width: 60rpx;
						height: 60rpx;
						border-radius: 50%;
					}
					text{
						width: calc(100% - 78rpx);
						font-size: 28rpx;
						line-height: 40rpx;
						color:#26252A;
						white-space:nowrap;
						overflow:hidden;
						text-overflow:ellipsis;
						word-break: break-all;
						
					}
				}
				.content_list_commodity2 {
					padding-top: 40rpx;
				}
				.content_list_commodity{
					margin-bottom: 40rpx;
					display: flex;
					justify-content: space-between;
					.right_left{
						image{
							width: 128rpx;
							height: 128rpx;
						}
					}
					.right_right{
						width: calc(100% - 142rpx);
						.right_right_name{
							display: flex;
							justify-content: space-between;
							.right_right_top_left{
								width: calc(100% - 120rpx);
								font-size: 24rpx;
								line-height: 34rpx;
								color:#26252A;
								height: 64rpx;
								overflow:hidden;
								text-overflow:ellispsis;
								display:-webkit-box;
								-webkit-line-clamp:2;
								-webkit-box-orient:vertical;
							}
							.right_right_top_right{
								text-align: right;
								display: flex;
								flex-direction: column;
								justify-content: flex-end;
								.money{
									font-size: 28rpx;
									line-height: 40rpx;
									color:#26252A;
									margin-bottom: 10rpx;
									font-weight: 700;
								}
								.num{
									color:#666666;
									font-size: 24rpx;
									line-height: 34rpx;
								}
							}
						}
					}
					.right_right_label{
						margin-top: 16rpx;
						width: 280rpx;
						height: 48rpx;
						background: #f6f7fb;
						font-size: 20rpx;
						white-space:nowrap;
						overflow:hidden;
						text-overflow:ellipsis;
						color:#ADADAD;
						line-height: 48rpx;
						padding: 0 24rpx;
						box-sizing: border-box;
					}
					.right_right_money{
						margin-top: 14rpx;
						color:#FF2F2F;
						font-size: 28rpx;
						line-height: 40rpx;
					}
				}
			}
		}
	}
	.right_right_money_box {
		margin-top: 14rpx;
		color: #FF2F2F;
		font-size: 28rpx;
		line-height: 40rpx;
		display: flex;
	}
</style>
